package com.shoes.dao;

import com.shoes.model.CouponDO;
import com.shoes.model.StoreDO;
import com.shoes.model.UserCouponDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author asen
 */
@Repository
public interface StoreDAO {
    int insertStore(StoreDO store);
    int updateStoreInfo(StoreDO store);
    int insertDefaultFreight(@Param("storeId")long storeId, @Param("regionId")long regionId,
                             @Param("goodsNum")int goodsNum, @Param("freight")BigDecimal freight,
                             @Param("goodsNumAdd")int goodsNumAdd, @Param("freightAdd")BigDecimal freightAdd);
    boolean updateCashOnDelivery(@Param("storeId")long storeId, @Param("cod")int cod);
    boolean updateSeventhDaysReturn(@Param("storeId")long storeId, @Param("seventh")int seventh);
    boolean updateGuaranteeBusiness(@Param("storeId")long storeId, @Param("guarantee")int guarantee);
    int insertCoupon(CouponDO coupon);
    int deleteCoupon(@Param("storeId")long storeId, @Param("id")String id);
    List<CouponDO> queryCouponListByStoreId(@Param("storeId")long storeId);
    int insertUserCouponRecord(@Param("userId")long userId, @Param("couponId") long couponId, @Param("couponSn")String couponSn);
    List<UserCouponDO> queryUserCouponListByStoreId(@Param("storeId")long storeId);
}
